HAL I3C migration: List of applicable concepts ¶
This section provides information about the HAL I3C applicable architecture concepts.
Concepts for I3C ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into three levels of functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The initialization structure has been removed and replaced by the configuration structures
|
|
The handle structure has been renamed to
|
|
|
The structure
|
|
|
|
|
|
New APIs are available to get and set I3C features. |
|
|
The
|
|
|
Two functions to set and get user data are available:
|
|
|
Individual callback registration APIs replace global register and unregister functions |
The callback registration is handled by specific functions for each I3C event. These functions are used to register callback functions for different I3C events. |
|
|
|
|
HAL I3C APIs now rely on LL APIs rather than performing direct register access. |
|
|
Define statements and enumerations redirected to LL equivalents |
HAL I3C define statements and enumerations are based on LL define statements. |
|
All hardware macros have been removed from the HAL I3C driver, and equivalent services are ensured through the LL APIs. |
|
|
The I3C state machine is reworked to ensure transitions of the peripheral functional states. |
|
|
The HAL I3C functions were updated to return:
|
|
|
Involves redesigning the error handling mechanisms within the HAL to improve the detection, reporting, and handling of errors. |
|
|
All TypeDef parts of the HAL I3C driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using
|
|
|
Merge HAL extension files with common ones and remove the EX prefix from APIs. |
Only one HAL I3C header file remains and all macros, define statements, and functions from
|
|
Provide RTOS-compatible acquire/release bus services for communication peripheral drivers. |
New functions,
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including I3C instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL I3C functions start with
|
Other HAL I3C changes ¶
|
Concept |
Consideration |
|---|---|
|
Rationalize operational functions |
All transfer operations, including single and multiple CCC transfers, can now be performed using the same transfer functions for polling, interrupt, and DMA modes. The following APIs:
have been replaced by:
|
|
Add an interface to help the application retrieve the number of data received on the target side |
At the end of a transfer, the application needs to know the size of the data received or transmitted on the target side.
This can be done using the API:
|
|
Add an interface to manage specific sequences |
Introduce a dedicated interface to stop SCL toggling in an infinite loop until a target responds, via the
|
|
The function
|
The frame formatting and building APIs is reworked to rely on building a transfer context, which is then submitted to the transfer start function.
The
|